package com.itgaoshu.service.impl;

import com.itgaoshu.bean.Baoque;
import com.itgaoshu.bean.Huishou;
import com.itgaoshu.bean.Pharmacy;
import com.itgaoshu.mapper.PharmacyMapper;
import com.itgaoshu.service.PharmacyService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * \* @author: 李豪杰
 * \* Date: 2021/3/19
 * \* Time: 15:49
 * \* Description:
 * \
 */
@Service
@Transactional
public class PharmacyServiceImpl implements PharmacyService {
    @Resource
    private PharmacyMapper pharmacyMapper;
    /**
     * 查询药房里所有的药品
     * @return
     */
    @Override
    public List<Pharmacy> selectAllPharmacy(Pharmacy pharmacy) {
        return pharmacyMapper.selectAllPharmacy(pharmacy);
    }
    @Override
    public int addbaoque(Baoque baoque) {
        return pharmacyMapper.addbaoque(baoque);
    }

    @Override
    public int selbaoqueName(Baoque baoque) {
        return pharmacyMapper.selbaoqueName(baoque);
    }

    @Override
    public int upbaoquenum(Baoque baoque) {
        return pharmacyMapper.upbaoquenum(baoque);
    }

    @Override
    public int delpharymacy(Pharmacy pharmacy) {
        return pharmacyMapper.delpharymacy(pharmacy);
    }

    @Override
    public int addhuishou(Huishou huishou) {
        return pharmacyMapper.addhuishou(huishou);
    }

    @Override
    public List<Huishou> selhuishou(Huishou huishou) {
        return pharmacyMapper.selhuishou(huishou);
    }

    @Override
    public int delhuishou(Huishou huishou) {
        return pharmacyMapper.delhuishou(huishou);
    }
}
